package com.cmcc.shared.utils;

import android.content.Context;
import android.widget.TextView;

public class TextViewUtil {
    public static void setTextViewByLimit(TextView view, Boolean limit, String value, String otherValue) {
        view.setText(limit ? value : otherValue);
    }

    public static void setTextViewValue(Context context, TextView view, int label, String value, String defaultValue) {
        view.setText(context.getString(label, null != value && !value.isEmpty() ? value : defaultValue));
    }
}
